function drawPC(result,option,data,str)

%% 平滑
figure
hold on 
% for i=1:length(data.node(:,1))
%     x=data.node(i,1); 
%     y=data.node(i,2);
%     rectangle('Position',[y-0.5,x-0.5,1,1],'FaceColor','w')
% end
for i=1:length(data.B(:,1))
    x=data.B(i,1);
    y=data.B(i,2);
    rectangle('Position',[y-0.5,x-0.5,1,1],'FaceColor','k')
end
path=result.path1;
% path0=path(1,2:3);
% for i=2:length(path(:,1))-1
%     node1=path(i-1,:);
%     node2=path(i,:);
%     node3=path(i+1,:);
%     temp1=node2-(node2-node1)/3;
%     temp2=node2+(node3-node2)/3;
%     X=[temp1(3),node2(3),temp2(3)];
%     Y=[temp1(2),node2(2),temp2(2)];
%     if length(unique(X))==3
%         xi=temp1(3):(temp2(3)-temp1(3))/100:temp2(3);
%         yi=interp1(X,Y, xi, 'cubic');
%         path0=[path0;[yi;xi]'];
%     elseif length(unique(Y))==3
%         yi=temp1(2):(temp2(2)-temp1(2))/100:temp2(2);
%         xi=interp1(Y,X, yi, 'cubic');
%         path0=[path0;[yi;xi]'];
%     else
%         path0=[path0;node2(2:3)];
%     end
% end
plot(path(:,3),path(:,2),'LineWidth',2)
%plot(path0(:,2),path0(:,1),'LineWidth',2)
axis equal
title([str,'总目标:',num2str(result.fit)])
set(gca,'YDir','reverse')	% 翻转Y轴
end